Skip to content

Instantly share code, notes, and snippets.

@ityonemo
ityonemo / test.md
Last active May 8, 2024 20:17
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@NotHarshhaa
NotHarshhaa / k8s-install.md
Last active May 8, 2024 20:16
k8s step-by-step installation guide on Ubuntu 20.04 from scratch

Certainly! Here's a step-by-step guide to installing Kubernetes (K8s) on Ubuntu 20.04 from scratch. This guide will walk you through the process of setting up a basic Kubernetes cluster using kubeadm, kubelet, and kubectl.

Prerequisites:

  1. Ubuntu 20.04: You should have a clean installation of Ubuntu 20.04 on the machines where you plan to set up your Kubernetes cluster.

  2. Minimum 2 Nodes: For a basic Kubernetes cluster, you need at least two nodes - one for the master and one or more for worker nodes.

  3. Network Configuration: Ensure that your nodes can communicate with each other over the network. You should have a static IP address for each node.

@scyto
scyto / proxmox.md
Last active May 8, 2024 20:16
proxmox cluster proof of concept

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@karpathy
karpathy / min-char-rnn.py
Last active May 8, 2024 20:15
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ad3m3r5
ad3m3r5 / proxmox-unprivileged-lxc-coral-usb.md
Last active May 8, 2024 20:14
USB Coral TPU Passthrough for Unprivileged LXC in Proxmox

This guide is how I got a Coral TPU (USB) working in an unprivileged LXC container.

At the end, you should be able to use the Coral TPU for inferencing inside of an unprivileged LXC container as well as Docker containers within the LXC, such as Frigate.

This does NOT require privileged LXC or docker container.

NOTES:

  • Proxmox Version: 8.1.10
  • LXC Container: Debian 10/11 (Example #1)
    • Debian 12 was used as the Docker host (Example #2)
@Gadgetoid
Gadgetoid / README.md
Last active May 8, 2024 20:12
Raspberry Pi 5 - All channels on pwm0
@vinthewrench
vinthewrench / testshunt.c
Created February 9, 2022 22:58
Using gattlib to read values from victron smart shunt bluetooth
/*
clang++ -Wall -o testshunt testshunt.c /usr/lib/libgattlib.so
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "gattlib.h"
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 20:04
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

using UnityEngine;
using System.Collections.Generic;
[RequireComponent(typeof(MeshRenderer))]
[RequireComponent(typeof(MeshFilter))]
public class GridMesh : MonoBehaviour
{
public int GridSize;
void Awake()